package HomeWork_java04;

public class Player extends Role {
	public void Attack(monster m1){
		m1.setHP(m1.getHP()-this.getHarm());
		m1.show();
		this.show();
	}
	public void Defensive(monster m1){
		int a;
		a=m1.getHarm()-this.getDefense();
		if(a<0){
			a=1;
		}
		this.setHP(this.getHP()-a);
		this.show();
		m1.show();
	}
	public Player(){
		
	}
	public Player(String name,int HP,int harm,int defense){
		super(name,HP,harm,defense);
	}
	
}
